﻿// <copyright file="TrackInfo.cs" company="Microsoft Corporation">
// Copyright (c) 2009 Microsoft Corporation All Rights Reserved
// </copyright>
// <author>Michael S. Scherotter</author>
// <email>mischero@microsoft.com</email>
// <date>2009-11-27</date>
// <summary>TrackInfo class definition</summary>

namespace Microsoft.WebAnalytics.Data
{
    using System.Collections.Generic;
    using System.Runtime.Serialization;

    /// <summary>
    /// Track Info for media
    /// </summary>
    [DataContract]
    public class TrackInfo
    {
        /// <summary>
        /// Initializes a new instance of the TrackInfo class
        /// </summary>
        public TrackInfo()
        {
        }

        /// <summary>
        /// Gets or sets the bitrate
        /// </summary>
        [DataMember]
        public long Bitrate { get;  set; }

        /// <summary>
        /// Gets or sets the custom attributes
        /// </summary>
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly", Justification = "Necessary for XAML serialization."), DataMember]
        public Dictionary<string, string> CustomAttributes { get; set; }

        /// <summary>
        /// Gets or sets the track index
        /// </summary>
        [DataMember]
        public long Index { get; set; }

        /// <summary>
        /// Gets or sets the track language
        /// </summary>
        [DataMember]
        public string Language { get; set; }

        /// <summary>
        /// Gets or sets the track name
        /// </summary>
        [DataMember]
        public string Name { get; set; }

        /// <summary>
        /// Gets or sets the track data
        /// </summary>
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1002:DoNotExposeGenericLists", Justification = "Necessary for XAML serialization."), 
         System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly", Justification = "Necessary for XAML serialization."), DataMember]
        public List<TimelineEvent> TrackData { get; set; }

        /// <summary>
        /// Gets or sets the dropped frames per second
        /// </summary>
        [DataMember(Name = "DF", IsRequired = false, EmitDefaultValue = false)]
        public double DroppedFramesPerSecond { get; set; }
    }
}
